package com.dailyblue.java.spring.jwt.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName emp
 */
@TableName(value ="emp")
@Data
public class Emp implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 用户账号
     */
    private String ecode;

    /**
     * 
     */
    private String ename;

    /**
     * 
     */
    private String epass;

    /**
     * 职位
     */
    private Integer pid;

    /**
     * 
     */
    private Date hiredate;

    /**
     * 
     */
    private Double sal;

    /**
     * 
     */
    private Integer deptno;

    /**
     * 
     */
    private Date birthday;

    /**
     * 
     */
    private String sex;

    /**
     * 
     */
    private String phone;

    /**
     * 
     */
    private Integer state;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    /**
     * 
     */
    public Integer getId() {
        return id;
    }

    /**
     * 
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 用户账号
     */
    public String getEcode() {
        return ecode;
    }

    /**
     * 用户账号
     */
    public void setEcode(String ecode) {
        this.ecode = ecode;
    }

    /**
     * 
     */
    public String getEname() {
        return ename;
    }

    /**
     * 
     */
    public void setEname(String ename) {
        this.ename = ename;
    }

    /**
     * 
     */
    public String getEpass() {
        return epass;
    }

    /**
     * 
     */
    public void setEpass(String epass) {
        this.epass = epass;
    }

    /**
     * 职位
     */
    public Integer getPid() {
        return pid;
    }

    /**
     * 职位
     */
    public void setPid(Integer pid) {
        this.pid = pid;
    }

    /**
     * 
     */
    public Date getHiredate() {
        return hiredate;
    }

    /**
     * 
     */
    public void setHiredate(Date hiredate) {
        this.hiredate = hiredate;
    }

    /**
     * 
     */
    public Double getSal() {
        return sal;
    }

    /**
     * 
     */
    public void setSal(Double sal) {
        this.sal = sal;
    }

    /**
     * 
     */
    public Integer getDeptno() {
        return deptno;
    }

    /**
     * 
     */
    public void setDeptno(Integer deptno) {
        this.deptno = deptno;
    }

    /**
     * 
     */
    public Date getBirthday() {
        return birthday;
    }

    /**
     * 
     */
    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }

    /**
     * 
     */
    public String getSex() {
        return sex;
    }

    /**
     * 
     */
    public void setSex(String sex) {
        this.sex = sex;
    }

    /**
     * 
     */
    public String getPhone() {
        return phone;
    }

    /**
     * 
     */
    public void setPhone(String phone) {
        this.phone = phone;
    }

    /**
     * 
     */
    public Integer getState() {
        return state;
    }

    /**
     * 
     */
    public void setState(Integer state) {
        this.state = state;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Emp other = (Emp) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getEcode() == null ? other.getEcode() == null : this.getEcode().equals(other.getEcode()))
            && (this.getEname() == null ? other.getEname() == null : this.getEname().equals(other.getEname()))
            && (this.getEpass() == null ? other.getEpass() == null : this.getEpass().equals(other.getEpass()))
            && (this.getPid() == null ? other.getPid() == null : this.getPid().equals(other.getPid()))
            && (this.getHiredate() == null ? other.getHiredate() == null : this.getHiredate().equals(other.getHiredate()))
            && (this.getSal() == null ? other.getSal() == null : this.getSal().equals(other.getSal()))
            && (this.getDeptno() == null ? other.getDeptno() == null : this.getDeptno().equals(other.getDeptno()))
            && (this.getBirthday() == null ? other.getBirthday() == null : this.getBirthday().equals(other.getBirthday()))
            && (this.getSex() == null ? other.getSex() == null : this.getSex().equals(other.getSex()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getEcode() == null) ? 0 : getEcode().hashCode());
        result = prime * result + ((getEname() == null) ? 0 : getEname().hashCode());
        result = prime * result + ((getEpass() == null) ? 0 : getEpass().hashCode());
        result = prime * result + ((getPid() == null) ? 0 : getPid().hashCode());
        result = prime * result + ((getHiredate() == null) ? 0 : getHiredate().hashCode());
        result = prime * result + ((getSal() == null) ? 0 : getSal().hashCode());
        result = prime * result + ((getDeptno() == null) ? 0 : getDeptno().hashCode());
        result = prime * result + ((getBirthday() == null) ? 0 : getBirthday().hashCode());
        result = prime * result + ((getSex() == null) ? 0 : getSex().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", ecode=").append(ecode);
        sb.append(", ename=").append(ename);
        sb.append(", epass=").append(epass);
        sb.append(", pid=").append(pid);
        sb.append(", hiredate=").append(hiredate);
        sb.append(", sal=").append(sal);
        sb.append(", deptno=").append(deptno);
        sb.append(", birthday=").append(birthday);
        sb.append(", sex=").append(sex);
        sb.append(", phone=").append(phone);
        sb.append(", state=").append(state);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}